{% load i18n %}
  <div 
     style="margin-left:{% widthratio comment.level 30 100 %}%"
     class="blogcomment {% cycle odd,even %}{% ifequal object.author comment.user %} creator{% endifequal %}" 
     id="c{{ comment.id }}">
    <span class="author">{% link comment.user %}</span>
    <span class="comment-time"><a href="#c{{ comment.id }}">{{ comment.pub_date|date }} {{ comment.pub_date|time }}</a></span>
    <div class="text">{% if settings.GRAVATAR_ENABLE %}<img alt="avatar" src="{{ comment.get_gravatar_url }}" class="avatar" />{% endif %}{{ comment.body_html|safe }}</div>

    {% if object.comments_open %}
    <a class="reply-link" 
       id="reply-link-{{ comment.id }}" 
       onclick="return replyto({{ comment.id }})"
       href="?reply_to={{ comment.id }}">{% trans "reply" %}</a>
    {% endif %}

    {% ifequal user comment.user %}
    <a class="edit-comment"
       id="edit-comment-{{ comment.id }}"
       onclick="return edit_comment({{ comment.id }}, '{% url comment_edit comment.id %}');"
       href="#">{% trans "edit" %}</a>
    <a class="cancel-edit"
       id="cancel-edit-{{ comment.id }}"
       onclick="return cancel_edit({{ comment.id }});"
       href="#">{% trans "cancel" %}</a>
    <input type="submit" value="submit" class="edit-submit" id="edit-submit-{{ comment.id }}" 
           onclick="return submit_edit({{ comment.id }}, '{% url comment_edit comment.id %}');" />
    {% endifequal %}

    {% if user.is_staff %}
    <a class="delete-comment"
       id="delete-comment-{{ comment.id }}"
       onclick="return delete_comment({{ comment.id }}, '{% url comment_delete comment.id %}');"
       href="#">{% trans "delete" %}</a>
    {% endif %}

    {% if object.comments_open %}{% ifequal reply_to comment.id %}
    {% include "blog/comment_form.html" %}
    {% endifequal %}{% endif %}
  </div>
